package com.leyou.order.inter.pojo;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @数表名称 tb_order_detail
 * @开发日期 2020-03-05
 */
@Data
@Table(name="tb_order_detail")
@NoArgsConstructor
public class OrderDetail implements Serializable {
    
    /** 订单详情id  (主健ID) */
    @Id
    @Column(name="id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    /** 订单id */
    @Column(name="order_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long orderId;

    /** sku商品id */
    @Column(name="sku_id")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long skuId;

    /** 购买数量 */
    @Column(name="num")
    private Integer num;

    /** 商品标题 */
    @Column(name="title")
    private String title;

    /** 商品动态属性键值集 */
    @Column(name="own_spec")
    private String ownSpec;

    /** 价格,单位：分 */
    @Column(name="price")
    private Long price;

    /** 商品图片 */
    @Column(name="image")
    private String image;

    public OrderDetail(Long orderId) {
        this.orderId = orderId;
    }

    private static final long serialVersionUID = 1L;
}